import request from '@/utils/request'

export default {
  getVolunteerListPage(current, limit, volunteerQuery) {
    return request({
      url: `/volunteer/pageVolunteerCondition/${current}/${limit}`,
      method: 'post',
      data: volunteerQuery
    })
  },
  deleteVolunteerById(id) {
    return request({
      url: `/volunteer/${id}`,
      method: 'delete'
    })
  },
  //添加用户
  addVolunteer(volunteer) {
    return request({
      url: `/volunteer/addVolunteer`,
      method: 'post',
      data: volunteer
    })
  },
  //根据ID值获取用户信息
  getVolunteerById(id) {
    return request({
      url: `/volunteer/getVolunteerById/${id}`,
      method: 'get',
    })
  },
  //修改讲师信息
  updateVolunteerInfo(volunteer) {
    return request({
      url: `/volunteer/updateVolunteer`,
      method: 'post',
      data: volunteer
    })
  }
}
